<?php
/**
 * Table_Comments
 *
 * @package Movoin Blog
 * @subpackage Table
 *
 */

//{{include
FLEA::loadClass ('FLEA_Db_TableDataGateway');
//}}

class Table_Comments extends FLEA_Db_TableDataGateway {

    //数据表名称
    var $tableName = 'comments';

        //数据表主键字段名
    var $primaryKey = 'comment_id';

    //定义从属关联
    var $beLongsTo = array(
        'tableClass' => 'table_posts',
        'foreignKey' => 'post_id',
        'mappingName' => 'posts',
        'counterCache' => 'comment_counts',
        'fields' => 'title'
    );

}